#coding:utf-8
#file:PyGTKButton.py

import pygtk
pygtk.require("2.0")
import gtk

class MyWindow:
    def __init__(self, title, width, height):
        self.window = gtk.Window()
        self.window.set_title(title)
        self.window.set_default_size(width, height)
        hbox = gtk.HBox(False, 20)
        button1 = gtk.Button('Button1')
        button2 = gtk.Button('Button2')
        button3 = gtk.Button('Button3')
        hbox.pack_start(button1)
        hbox.pack_start(button2)
        hbox.pack_start(button3)
        self.window.add(hbox)
        hbox.show()
        button1.show()
        button2.show()
        button3.show()
        self.window.show()

    def main(self):
        gtk.main()

if __name__ == '__main__':
    window = MyWindow('Window', 150, 45)
    window.main()
